import request from '@/utils/request'
//使用说明
//  export const getList = data => request.get('/api/list', data, false)
//              页面调用名  请求参数       请求类型  接口地址         loading是否显示
/*页面中调用方法：（若无请求参数则留空,例：this.$api.getList()）
this.$newapi.getList(params).then(res => {})
*/

//登陆
export const login = data => request.post('/api/user/login', data)
//获取用户信息
export const getUserInfo = data => request.get('/api/user/getUserInfo', data)
//获取openId
export const getOpenId = data => request.get('/api/order/getOpenId', data)
//新增订单
export const addOrder = data => request.post('/api/order/addOrder', data)
//扫码报修
export const scan = data => request.get('/api/item-equipment/scan', data)
//查看维修历史
export const getRepairLogs = data => request.get('/api/order-repair-logs/getRepairLogs', data)
//新增维修历史
export const addRepairLogs = data => request.post('/api/order-repair-logs/addRepairLogs', data)
//获取该账号下的报修订单
export const getOrderList = data => request.get('/api/order/getOrderList', data)
//订单状态修改
export const updateOrder = data => request.post('/api/order/updateOrder', data)
//获取订单详情
export const getOrderDetail = data => request.get('/api/order/getOrder', data)


//图片上传
export const picture = data => request.get('/upload/picture', data)
//视频上传
export const video = data => request.get('/upload/video', data)